<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>登录页</title>
<style>
.logindiv:align:center;
</style>
</head>

<body>
<div class="logindiv">
<b>1.输入手机号码</b>||<b>2.手机验证</b>||<b>3.完成</b><br><br><br>
<form action="{url('login/resetpwd2')}" method="post" onSubmit="return checkMobile();">
<div>手机号码：<input type="text"  name="phone" id='phone'/></div><br />
<div>验证码：<input type="text" name="validate" id="validate"/><img style="cursor: pointer;" id="safecode" src="{url('login/validatePic')}" onclick="reloadcode()" />
<!--<img src="http://frameyao.com/?path=user&action=login&method=validatePic" />--></div><br />
<input type="hidden" name="HASH_CODE" value="{$formhash}"/>
<input type="submit" value="下一步" />
</form>
</div>
{literal}
<script language="javascript">
	
function reloadcode(){
	var d = new Date();
	document.getElementById('safecode').src="{url('login/validatePic')}"+'&t='+d.toTimeString();
}
	
function checkMobile(){
    var sMobile = document.getElementById('phone').value;
	 var validate = document.getElementById('validate').value;
	 
	 if(!sMobile || !validate){
		 alert("手机号和验证码为必填项!");
		 return false;
		 }
	 
	var myreg =/^([0-9]{11})?$/;
	
      if(!myreg.test(sMobile)){ 
        alert("不是完整的11位手机号或者正确的手机号前七位");
        return false;
    }
} 
</script>
{/literal}
</body>
</html>
